'''
Created on 2009-02-26

@author: belleyma
'''
import glob
import os

class FileList:
    '''
    classdocs
    '''
    def __initVar():
        self.baseDir = null
        
    def __init__(selfparams):
        '''
        Constructor
         '''
        __initVar()
           
    def ListDir(baseDir, recurse):
        
        lstDir = os.walk(baseDir, True, recurse)
                    
        return lstDir 
        
    def ListFiles(baseDir, recurse, pattern):
        files = []
        dirLst = FileList.ListDir(baseDir, recurse)

        if dirLst :
            for dir in dirLst:
                lstfile = glob.glob(dir[0] + "\\" + pattern)
                if lstfile:
                    files.extend(lstfile)
  
        return files 
